package com.jiandian.util;

import com.jiandian.consts.GameInfoConsts;

/**
 * 腾讯云cos路径工具类
 *
 * @author lik
 */
public class OssPathUtil {
    private static String getKeyByGameNameBySuffix(String dirName, String suffix) {

        return new StringBuilder(dirName)
                .append("/").append(suffix).toString();
    }

    /**
     * 获取游戏名称key
     *
     * @param dirName
     * @return
     */
    public static String getRealGameNameKey(String dirName) {
        return getKeyByGameNameBySuffix(dirName, GameInfoConsts.NAME_TEXT);
    }

    /**
     * 获取游戏简单信息key
     *
     * @param dirName
     * @return
     */
    public static String getContextKey(String dirName) {
        return getKeyByGameNameBySuffix(dirName, GameInfoConsts.CONTENT_TEXT);
    }

    /**
     * 获取游戏详细介绍key
     *
     * @param dirName
     * @return
     */
    public static String getTextKey(String dirName) {
        return getKeyByGameNameBySuffix(dirName, GameInfoConsts.TEXT_TEXT);
    }

    /**
     * 获取logo图片key
     *
     * @param dirName
     * @return
     */
    public static String getLogoKey(String dirName) {
        return getKeyByGameNameBySuffix(dirName, GameInfoConsts.LOGO_IMG);
    }

    /**
     * 获取apk安装包key
     *
     * @param dirName
     * @return
     */
    public static String getApkKey(String dirName) {
        return getKeyByGameNameBySuffix(dirName, GameInfoConsts.GAME_APK);
    }



}
